@extends('common')
@section('content')
    <style type="text/css">
        span{
            margin-left: 20px;
        }
        tr{
            height: 40px;
        }
        h3{
            margin-left: 30px;


        }
    </style>
    <h3>基本信息</h3><hr>

    <img src="{{url($user->use_pic)}}" style="margin-left:460px;margin-top:10px;">
    <div align="center" style="margin:left; width:600px;margin-top:10px;">

        <table class="table table-bordered table-hover definewidth m10" style="margin-left:300px; width:600px;margin-top:10px;">

            <tr>
                <td>姓名：{{$user->use_name}}
                    <span>性别：@if($user->use_sex==1){{'男'}}@else{{'女'}}@endif</span>
                    <span>民族：{{$user->use_nation}}</span></td>
            </tr>
            <tr>
                <td>出生年月：{{$user->use_birthday}}</td>
            </tr>
            <tr>
                <td>身份证号：{{$user->use_card}}</td>

            </tr>
            <tr>
                <td>籍贯：{{$user->use_origin}}</td>

            </tr>
            <tr>
                <td>职位：{{$user->use_position}}</td>

            </tr>
            <tr>
                <td>入职年限：{{$user->use_enty}}</td>

            </tr>
            <tr>
                <td>联系地址：<div type="1">{{$user->use_address}}</div><a href="javascript:;" class="xiugai">修改</a></td>

            </tr>
            <tr>
                <td>手机号：<div type="2">{{$user->use_phone}}</div><a href="javascript:;" class="xiugai">修改</a></td>

            </tr>
            <tr>
                <td>邮箱：<div type="3">{{$user->use_email}}</div><a href="javascript:;" class="xiugai">修改</a></td>

            </tr>
        </table>
    </div>
    <script>
        $(function(){
            $(document).on('click','.xiugai',function() {
                that=$(this).parent();
                type=that.children('div:eq(0)').attr('type');
                old=that.children('div:eq(0)').text();
                $(this).after('<a href="javascript:history.go(0);">取消</a><form action="{{url('/human/information')}}" method="post"><table><tr><td><input type="text" name="value" value='+old+' id="focus"><input type="hidden" name="type" value='+type+'><input type="hidden" name="_token" value="{{ csrf_token() }}" /><br/></td><td><input type="submit" value="保存"></td></tr></table></form>');
                that.children('div:eq(0)').remove();
                $(this).remove();
            })
            $(document).on('focus','#focus',function() {
                $(this).val('')
            })
        })
    </script>
@stop